import { FindOperator } from 'typeorm'

export interface IId {
	doc_id: string;
}

export interface IProp {
	prop_id: string;
	doc_id: string;
	parent_id: string;
	prop: string;
	required: number;
	type: string;
	optional: string;
	label: string;
	note: string;
}

export interface IAdd {
	project_id: string;
	spaceid: string,
	type: string;
	doc_parent_id: string;
	doc_title: string;
	editer: string;
	edit_time?: number;
	status?: number;
	partners?: string;
	tables?: string;
	params?: string;
	returns?: string;
	message_type?: string;
	params_prop?: IProp[]
	returns_prop?: IProp[]
}

export interface ISearch {
	doc_parent_id?: string;
	doc_title?: FindOperator<string>;
	message_type?: FindOperator<string>;
	spaceid: string;
	type: string;
}

export interface IAddClassify {
	project_id: string;
	spaceid: string;
	type: string;
	doc_parent_id: string;
	doc_title: string;
	editer: string;
}

export interface IEdit {
	doc_id: string;
	doc_title: string;
	editer: string;
	message: string;// 附带信息
	tables?: string;
	params?: string;
	returns?: string;
	params_prop?: IProp[]
	returns_prop?: IProp[]
}

export interface ICreatQuestion {
	state?: 0 | 1 | 2 | 3;
	params?: string;
	question_id: string;
	doc_id: string;
	message?: string;
	editor?: string;
	edit_time?: number;
	confirmor?: string;
	confirm_time?: number;
	replier?: string;
	replies_time?: number;
}
